package com.hongawen.poi.pojo;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author hongawen
 * @version 1.0.0
 * @date 2022年03月30日 15:13
 */
@Data
public class Student implements Serializable {

    private String id;

    /**
     * 学生姓名
     */
    @Excel(name = "学生姓名", width = 30)
    private String name;

    /**
     * 每个学生的户籍
     * mergeVertical：将相同户籍下的合并成一个单元格
     */
    @Excel(name = "户籍", replace = {"江苏_0", "上海_1", "浙江_2"}, mergeVertical = true)
    private int home;

    /**
     * 学生性别
     */
    @Excel(name = "学生性别", replace = {"男_0", "女_1"}, suffix = "生")
    private int sex;

    @Excel(name = "出生日期", format = "yyyy-MM-dd", width = 20)
    private Date birthday;

    @Excel(name = "进校日期", format = "yyyy-MM-dd")
    private LocalDateTime registrationDate;
}
